// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Lesser General Public License for more details.
// 
// You should have received a copy of the GNU Lesser General Public License
// along with this program.  If not, see http://www.gnu.org/licenses/.
// 

package mpls_qos;


//
// This file is part of an OMNeT++/OMNEST simulation example.
//
// Copyright (C) 2003-2008 Andras Varga
//
// This file is distributed WITHOUT ANY WARRANTY. See the file
// `license' for details on this and other legal matters.
//


simple Ingress_Router
{
    parameters:
        @display("i=block/routing");
    gates:
        inout gate[];

}

simple Ergress_Router
{
    parameters:
        @display("i=block/routing");
    gates:
        inout gate[];

}

simple Core_Router
{
    parameters:
        @display("i=block/routing");
    gates:
        inout gate[];

}




//
// Same as Tictoc8.
//
network MPLS_QOS
{
    @display("bgb=482,198");
    types:
        channel Channel extends ned.DelayChannel
        {
            delay = 100ms;
        }


    submodules:
        IR[3]: Ingress_Router;
        ER[1]: Ergress_Router {
            parameters:
                @display("i=abstract/person,gold;");
        }

        CR[10]: Core_Router;
    connections:
        IR[0].gate++ <--> Channel <--> CR[0].gate++;
        IR[0].gate++ <--> Channel <--> CR[3].gate++;
        IR[1].gate++ <--> Channel <--> CR[3].gate++;
        IR[1].gate++ <--> Channel <--> CR[5].gate++;
        IR[2].gate++ <--> Channel <--> CR[5].gate++;
        IR[2].gate++ <--> Channel <--> CR[7].gate++;

        CR[0].gate++ <--> Channel <--> CR[1].gate++;
        CR[1].gate++ <--> Channel <--> CR[3].gate++;
        CR[3].gate++ <--> Channel <--> CR[4].gate++;
        CR[4].gate++ <--> Channel <--> CR[5].gate++;
        CR[5].gate++ <--> Channel <--> CR[6].gate++;
        CR[6].gate++ <--> Channel <--> CR[7].gate++;
        CR[7].gate++ <--> Channel <--> CR[8].gate++;
        
        CR[1].gate++ <--> Channel <--> CR[2].gate++;
        CR[2].gate++ <--> Channel <--> CR[4].gate++;
        CR[6].gate++ <--> Channel <--> CR[9].gate++;
        CR[8].gate++ <--> Channel <--> CR[9].gate++;
        
        CR[2].gate++ <--> Channel <--> ER[0].gate++;
        CR[4].gate++ <--> Channel <--> ER[0].gate++;
        CR[6].gate++ <--> Channel <--> ER[0].gate++;
        CR[9].gate++ <--> Channel <--> ER[0].gate++;

}
